﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using VM.Entity.EntityMap.User;

namespace VM.Entity.EntityMap.ICon
{
    public class sys_icon
    {

        #region Model
        private int _id;
        private string _pcname;
        private string _appname;
        private int _useqty;
        /// <summary>
        /// 内码
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, IsOnlyIgnoreInsert = true)]
        [JsonIgnore]
        public int id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// pc端图标名称
        /// </summary>
        public string? pcName
        {
            set { _pcname = value; }
            get { return _pcname; }
        }
        /// <summary>
        /// 手机端图标名称
        /// </summary>
        public string? appName
        {
            set { _appname = value; }
            get { return _appname; }
        }
     
        /// <summary>
        /// 被引用次数
        /// </summary>
        [JsonIgnore]
        public int useQty
        {
            set { _useqty = value; }
            get { return _useqty; }
        }
        /// <summary>
        /// 创建人。当前用户内码
        /// </summary>
        [JsonIgnore]
        public int? createUserId { get; set; }
        /// <summary>
        /// 创建人信息
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(createUserId))]
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        [JsonIgnore]
        public sys_user createUser { get; set; }

        /// <summary>
        /// 创建日期
        /// </summary>
        [JsonIgnore]
        public DateTime? createDate { get; set; }

        /// <summary>
        /// 最后更新人
        /// </summary>
        [JsonIgnore]
        public int? updateUserId { get; set; }
        /// <summary>
        /// 创建人信息
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(updateUserId))]
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        [JsonIgnore]
        public sys_user updateUser { get; set; }

        /// <summary>
        /// 最后更新日期
        /// </summary>
        [JsonIgnore]
        public DateTime? updateDate { get; set; }

        #endregion Model
    }
}
